package tg.app.rj.workorder.wzlyaction;

import java.rmi.RemoteException;
import java.util.Date;

import psdi.common.action.ActionCustomClass;
import psdi.mbo.MboRemote;
import psdi.util.MXApplicationException;
import psdi.util.MXException;

public class CustWZLY_ZYZG implements ActionCustomClass{

	public void applyCustomAction(MboRemote mbo, Object[] arg1)
			throws MXException, RemoteException {
		applyCustomAction(mbo, new Date());
		
	}
	public void applyCustomAction(MboRemote mboremote, Date date)
		    throws MXException, RemoteException
		  {
		    try
		    {
		    	String wo24 = mboremote.getString("WO24");
		      if (wo24==null ||"".equalsIgnoreCase(wo24))
		      {
		        throw new MXApplicationException("workorder", "YJTX");
		      }

		      mboremote.setValue("WO25", mboremote.getUserName(), 11L);
		      mboremote.setValue("WO26", date, 11L);
		    }
		    catch (RemoteException remoteexception)
		    {
		      remoteexception.getMessage();
		    }
		  }
}
